Data flow system and method for heterogeneous data integration environments

ABSTRACT

A computer implemented method, apparatus, and computer usable program code for generating an execution plan graph from a data flow. A metadata representation of the data flow is generated in response to receiving the data flow. A set of code units is generated from the metadata representation. Each code unit in the set of code units is executable on multiple different types of runtime engines. The set of code units is processed to produce the execution plan graph.

CROSS-REFERENCE TO RELATED APPLICATIONS

Embodiments of the invention are related to the following applicationsentitled “DILATION OF SUB-FLOW OPERATORS IN A DATA FLOW,” Ser. No._______, attorney docket no. SV1920060024US1 filed on Mar. 10, 2006;“CLASSIFICATION AND SEQUENCING OF MIXED DATA FLOWS”, Ser. No. ______,attorney docket no. SVL920060026US1 filed on Mar. 10, 2006. “DATA FLOWSYSTEM AND METHOD FOR HETEROGENEOUS DATA INTEGRATION ENVIRONMENTS”, Ser.No. ______, attorney docket no. SVL920060027US1 filed on Mar. 10, 2006.All of the above related applications are assigned to the same assignee,and incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to data processing systems, andmore particularly to a computer implemented method, apparatus, andcomputer usable program code for integrating data flow in heterogeneousdata environments.

2. Description of the Related Art

In enterprise application systems, consolidation of various dataintegration tools is inevitable due to frequent merges and acquisitionsas normal business practices. Typical data integration applications arethose types of applications in which data from multiple sources onvaried data systems and repositories, need to be processed, combined, orotherwise transformed into data that is then loaded into repositories,need to be processed, combined, or otherwise transformed into data thatis then loaded into multiple targets, again residing on different datasystems and repositories. The best application performance may beachieved by making sure that the total data integration processing bebroken down into smaller components of processing modules and ensuringthat the appropriate runtime engine or runtime system is selected forthe appropriate task.

For example, a database engine is the most appropriate engine forfiltering rows of a relational table in a structured query language(SQL) database. Using the database engine is more efficient than pullingthe data out of the database and into a text file, where the text filerequires further filtering in order to insert the final data intoanother table in the same database. Structured query language (SQL)engines are specially optimized for such queries and tasks. In somecases, legacy data in text files or spreadsheets is best processed withby a specialized extract, transform, load (ETL) engine. Legacy datasource is any file, database, or software asset (such as a web serviceor business application) that supplies or produces data and that hasalready been deployed.

However, the average user is not conversant with all types of processingengines and is unable to effectively choose an engine or otherprocessing component easily. As a result, an enterprise needs to employexperts for each variety and variation of engines.

The problem is that there are different runtime systems that work verydifferently, use different protocols, and are generally incompatible.Such heterogeneous systems also have different development paradigms, nocommon developer language or even a uniform integrated developmentenvironment (IDE). In addition to these differences, new runtime systemsare continually added to the enterprise. Currently, such complex dataintegration applications rely on users developing separate modules ofapplications for each runtime system and writing specialized code foreach pair of runtime systems to bridge the gap between them. As aresult, current data integration applications do not allow dataprocessing engines to operate in a truly integrated fashion.

SUMMARY OF THE INVENTION

The aspects of the present invention provide a computer implementedmethod, apparatus, and computer usable program code for generating anexecution plan graph from a data flow. A metadata representation of thedata flow is generated in response to receiving the data flow. A set ofcode units is generated from the metadata representation. Each code unitin the set of code units is executable on multiple different types ofruntime engines. The set of code units is processed to produce theexecution plan graph.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the invention are setforth in the appended claims. The invention itself, however, as well asa preferred mode of use, further objectives and advantages thereof, willbest be understood by reference to the following detailed description ofan illustrative embodiment when read in conjunction with theaccompanying drawings, wherein:

FIG. 1 is a pictorial representation of a data processing system inwhich the aspects of the present invention may be implemented;

FIG. 2 is a block diagram of a data processing system in which aspectsof the present invention may be implemented;

FIG. 3 is a block diagram of a data integration system in accordancewith an illustrative embodiment of the present invention;

FIG. 4 is an exemplary data flow in a heterogeneous data integrationsystem in accordance with an illustrative embodiment of the presentinvention;

FIG. 5 is a flow diagram illustrating a processing framework for a dataintegration system in accordance with an illustrative embodiment of thepresent invention;

FIG. 6 is the data flow of FIG. 4 divided by region in a heterogeneousdata integration system in accordance with an illustrative embodiment ofthe present invention.

FIG. 7 is a flow diagram illustrating a region processing framework fora data integration system in accordance with an illustrative embodimentof the present invention;

FIG. 8 is an exemplary execution plan for the data flow of FIG. 6 for adata integration system in accordance with an illustrative embodiment ofthe present invention;

FIG. 9 is a flow diagram illustrating code generation in accordance withan illustrative embodiment of the present invention;

FIG. 10 is an exemplary data flow diagram for different runtime enginesin accordance with an illustrative embodiment of the present invention;

FIG. 11 is an exemplary flow diagram showing a logical operator graphmapped to an extended query graph model in accordance with anillustrative embodiment of the present invention;

FIG. 12 is an exemplary flow diagram of code generated by a codegeneration system in accordance with an illustrative embodiment of thepresent invention;

FIG. 13 is a data flow diagram interconnecting multiple operators for adata integration system in accordance with an illustrative embodiment ofthe present invention;

FIG. 14 is a table representing operator classification of FIG. 13 inaccordance with an illustrative embodiment of the present invention;

FIG. 15 is the data flow of FIG. 13 classified by region in accordancewith an illustrative embodiment of the present invention;

FIG. 16 is a partial data flow diagram from FIG. 15 with insertedstaging terminals in accordance with an illustrative embodiment of thepresent invention;

FIG. 17 is the data flow of FIG. 15 with staging terminals separatingregions divided into regions and with staging terminals in accordancewith an illustrative embodiment of the present invention;

FIG. 18 is a flowchart illustrating operation of a data integrationsystem in accordance with an illustrative embodiment of the presentinvention;

FIG. 19 is a flowchart illustrating data flow code generation inaccordance with an illustrative embodiment of the present invention;

FIG. 20 is a flowchart illustrating the process of converting a logicaloperator graph to an extended query graph model in accordance with anillustrative embodiment the present invention;

FIG. 21 is a flowchart illustrating operator classification, grouping,and ordering in accordance with an illustrative embodiment of thepresent invention;

FIG. 22 is a flowchart illustrating classification of operators in thedata flow in accordance with an illustrative embodiment of the presentinvention;

FIG. 23 is a flowchart illustrating operator sequencing in accordancewith an illustrative embodiment of the present invention;

FIG. 24 is a flowchart illustrating receiving the next sequence for anoperator in accordance with an illustrative embodiment of the presentinvention; and

FIG. 25 is a flowchart illustrating separating operators into regions inaccordance with an illustrative embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

With reference now to the figures and in particular with reference toFIGS. 1-2, exemplary diagrams of data processing environments areprovided in which embodiments of the present invention may beimplemented. It should be appreciated that FIGS. 1-2 are only exemplaryand are not intended to assert or imply any limitation with regard tothe environments in which aspects or embodiments of the presentinvention may be implemented. Many modifications to the depictedenvironments may be made without departing from the spirit and scope ofthe present invention.

With reference now to the figures, FIG. 1 depicts a pictorialrepresentation of a network of data processing systems in which aspectsof the present invention may be implemented. Network data processingsystem 100 is a network of computers in which embodiments of the presentinvention may be implemented. Network data processing system 100contains network 102, which is the medium used to provide communicationslinks between various devices and computers connected together withinnetwork data processing system 100. Network 102 may include connections,such as wire, wireless communication links, or fiber optic cables.

In the depicted example, server 104 and server 106 connect to network102 along with storage unit 108. In addition, clients 110, 112, and 114connect to network 102. These clients 110, 112, and 114 may be, forexample, personal computers or network computers. In the depictedexample, server 104 provides data, such as boot files, operating systemimages, and applications to clients 110, 112, and 114. Clients 110, 112,and 114 are clients to server 104 in this example. Network dataprocessing system 100 may include additional servers, clients, and otherdevices not shown.

In the depicted example, network data processing system 100 is theInternet with network 102 representing a worldwide collection ofnetworks and gateways that use the Transmission ControlProtocol/Internet Protocol (TCP/IP) suite of protocols to communicatewith one another. At the heart of the Internet is a backbone ofhigh-speed data communication lines between major nodes or hostcomputers, consisting of thousands of commercial, governmental,educational and other computer systems that route data and messages. Ofcourse, network data processing system 100 also may be implemented as anumber of different types of networks, such as for example, an intranet,a local area network (LAN), or a wide area network (WAN). FIG. 1 isintended as an example, and not as an architectural limitation fordifferent embodiments of the present invention.

With reference now to FIG. 2, a block diagram of a data processingsystem is shown in which aspects of the present invention may beimplemented. Data processing system 200 is an example of a computer,such as server 104 or client 110 in FIG. 1, in which computer usablecode or instructions implementing the processes for embodiments of thepresent invention may be located.

In the depicted example, data processing system 200 employs a hubarchitecture including north bridge and memory controller hub (NB/MCH)202 and south bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 areconnected to NB/MCH 202. Graphics processor 210 may be connected toNB/MCH 202 through an accelerated graphics port (AGP).

In the depicted example, local area network (LAN) adapter 212 connectsto SB/ICH 204. Audio adapter 216, keyboard and mouse adapter 220, modem222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM drive230, universal serial bus (USB) ports and other communication ports 232,and PCI/PCIe devices 234 connect to SB/ICH 204 through bus 238 and bus240. PCI/PCIe devices may include, for example, Ethernet adapters,add-in cards, and PC cards for notebook computers. PCI uses a card buscontroller, while PCIe does not. ROM 224 may be, for example, a flashbinary input/output system (BIOS).

HDD 226 and CD-ROM drive 230 connect to SB/ICH 204 through bus 240. HDD226 and CD-ROM drive 230 may use, for example, an integrated driveelectronics (IDE) or serial advanced technology attachment (SATA)interface. Super I/O (SIO) device 236 may be connected to SB/ICH 204.

An operating system runs on processing unit 206 and coordinates andprovides control of various components within data processing system 200in FIG. 2. As a client, the operating system may be a commerciallyavailable operating system such as Microsoft® Windows® XP (Microsoft andWindows are trademarks of Microsoft Corporation in the United States,other countries, or both). An object-oriented programming system, suchas the Java™ programming system, may run in conjunction with theoperating system and provides calls to the operating system from Java™programs or applications executing on data processing system 200 (Javais a trademark of Sun Microsystems, Inc. in the United States, othercountries, or both).

As a server, data processing system 200 may be, for example, an IBM®eServer™ pSeries® computer system, running the Advanced InteractiveExecutive (AIX®) operating system or the LINUX® operating system(eServer, pSeries and AIX are trademarks of International BusinessMachines Corporation in the United States, other countries, or bothwhile LINUX is a trademark of Linus Torvalds in the United States, othercountries, or both). Data processing system 200 may be a symmetricmultiprocessor (SMP) system including a plurality of processors inprocessing unit 206. Alternatively, a single processor system may beemployed.

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs are located on storage devices,such as HDD 226, and may be loaded into main memory 208 for execution byprocessing unit 206. The processes for embodiments of the presentinvention are performed by processing unit 206 using computer usableprogram code, which may be located in a memory such as, for example,main memory 208, ROM 224, or in one or more peripheral devices 226 and230.

Those of ordinary skill in the art will appreciate that the hardware inFIGS. 1-2 may vary depending on the implementation. Other internalhardware or peripheral devices, such as flash memory, equivalentnon-volatile memory, or optical disk drives and the like, may be used inaddition to or in place of the hardware depicted in FIGS. 1-2. Also, theprocesses of the present invention may be applied to a multiprocessordata processing system.

In some illustrative examples, data processing system 200 may be apersonal digital assistant (PDA), which is configured with flash memoryto provide non-volatile memory for storing operating system files and/oruser-generated data.

A bus system may be comprised of one or more buses, such as bus 238 orbus 240 as shown in FIG. 2. Of course, the bus system may be implementedusing any type of communication fabric or architecture that provides fora transfer of data between different components or devices attached tothe fabric or architecture. A communication unit may include one or moredevices used to transmit and receive data, such as modem 222 or networkadapter 212 of FIG. 2. A memory may be, for example, main memory 208,ROM 224, or a cache such as found in NB/MCH 202 in FIG. 2. The depictedexamples in FIGS. 1-2 and above-described examples are not meant toimply architectural limitations. For example, data processing system 200also may be a tablet computer, laptop computer, or telephone device inaddition to taking the form of a PDA.

Aspects of the present invention provide a computer implemented method,apparatus and computer usable program code for integrating data flow inheterogeneous data environments. Embodiments of the present inventionprovide an architecture and system that enables users to model logicalflows for higher level operations, or data flows, which are thenprocessed. A data flow represents a logical transformation and flow ofdata. The processing results in the generation of code units organizedinside an execution plan, capable of running on different runtimesystems in proper sequence and with automatic data exchange between thedifferent runtime systems. The runtime system includes the operatingsystem, runtime or execution engine, and other software used to executethe execution plan as is referred to generically as the runtime engine.An execution plan engine may be used to execute the execution plan graphand may invoke various runtime engines to run queries or jobs as needed.The execution plan or execution plan graph is an ordered sequence ofcode units generated based on the original data flow received from theuser from other formats which may include a logical operator graph andextended query graph model.

The execution plan also contains instructions to organize the code unitsinto transactional contexts as well. Each such transactional context isassociated with the individual runtime engine resource. For example, arelational database management system such as DB2 or a DataStageextract, transform, load (ETL) engine.

A runtime system or runtime engine is a program that performs a core oressential function for other programs. An engine can be a central orfocal program in an operating system, subsystem, or application thatcoordinates the overall operation of a coordinated set of programs.Runtime engine is also used to describe a special-purpose programcontaining an algorithm that can sometimes be changed or a function thatperforms all of the database access required by an application programwhile it is executing.

The data integration system also generates code to bridge or transform,data from a format used by one runtime engine domain to a format used byanother runtime engine domain. For example, generating a temporary fileor database table that can be used to exchange data from one engine toanother.

The data integration system allows for customized code generation forexchanges between two known engines. For example, since a DataStageextract, transform, load (ETL) engine is capable of accessing DB2database tables, the data integration system would instead generate codeto exchange data inside structured query language (SQL) views orstructured query language tables rather than files. In other cases,depending on how the exchanged data is used, files may still be used forbetter performance. For example, if a DataStage system needs data in afile, then it may be better for performance for a previous runtimeengine to provide the data in the file at termination, rather than in atable. By providing the file in this manner, the system avoids havingthe DataStage system extract data from the table to the file and onlythen continuing the runtime processing.

The data integration system also permits adding different runtimeengines as well as a means of describing different operations suited forthose runtime engines. A mechanism also exists to describe what type ofstaging, such as files, permanent tables, views, and queues, areacceptable and which are preferable for each kind of operation. Thisallows the code generator to pick and choose staging mechanisms thatbest suit the situation.

In the illustrative examples, the data integration system provides theability to generate an internal transformation graph model that isextensible to support new operators, the ability to generate appropriateexecution code modules and data interchange code modules to be able toexecute a transformation job across multiple runtime engines, and theability to generate code modules for different runtime engines from thesame internal representation. For example, a data flow may be compiledinto strict structured query language or into a strict DataStage job orany other type of job by plugging in the appropriate code generator.

FIG. 3 is a block diagram of a data integration system in accordancewith an illustrative embodiment of the present invention. Dataintegration system 300 of FIG. 3 is a system that may be implemented bya data processing system such as client 110 or server 104 of FIG. 1.Data flows are special data structures managed in data integrationsystem. Data flow 302 is built based on user input and may be createdusing a data flow user interface tool. For example, versions of the IBMDB2 Data Warehouse Edition (DWE) product have a data flow graphicaleditor that allows users to build data flows. Such user interfacesallows users to draw operator nodes and interconnect them with links toindicate a specific semantic instance of data transformation sequence.

Integrated development environment 304 is a software component thatassists computer programmers in developing, creating, editing, andmanaging code for target platforms. Integrated development environment304 may also contain code generation system 306.

Logical operator graph (LOG) 308 is a normalized, minimalistrepresentation of the user's data flow, made easier for code generationmanipulations. The term ‘logical’ indicates that the graph does not haveany physical aspects, such as data storage, presentation, or otherwise.Logical operator graph 308 is simply a logical abstract collection ofoperator nodes. Frequently a data flow data structure has otherinformation, not pertinent to its processing. For example, the positionsof borders for visual presentations. Logical operator graph 308 is onlythat specific portion of a complete data flow 302 that contains thepertinent data transform information. In some implementations, data flow302 does not have any un-necessary information, and all of data flow'scontents need to be used as-is, in which case logical operator graph 308is the same as data flow 302. As a result, the terms logical operatorgraph 308 and data flow 302 may be used interchangeably. Logicaloperator graph 308 is sent to code generation system 306.

Code generation system 306 converts logical operator graph 308 intoextended query graph model (EQGM) 310. Extended query graph model 310 isan internal data model used for analysis. This analysis also may includeoptimization processes. Extended query graph model 310 is analyzed toapply codegen optimization such as chunking and execution parallelism.Chunking is the process of breaking one subset of data flow 302 intomultiple pieces which yields optimal performance. Execution parallelismrefers to the code generation process that groups disparate set ofoperations within data flow 302 and executes them in parallel to yieldoptimal performance. After analysis, extended query graph model 310 isconverted into execution plan graph 312 by code generation system 306.Execution plan graph 312 is sent to the runtime systems for execution.

A graph like data structure, such as logical operator graph 308, iscommonly used to model the sequence of operations in typical dataprocessing activities. Each node in this graph represents a singlelogical step in the entire process. A link is used to interconnect nodesin the logical operator graph.

The logical operator graph 308 is composed of nodes, interconnected bylinks. Each node or ‘operator’ has specific semantics and propertyvalues, which indicate the specific type of data processing operation tobe performed.

Operators have a set of 0 to n inputs referred to as input ports.Operators also have a set of 0 to n outputs referred to as output ports.Depending on the semantics of the operation, an operator may allow theaddition of ports during the design and manipulation of the graph.

Operators have a set of properties. The property values are manipulatedby the graph instance designer to govern the parameters of theparticular operation. These operator properties may be of different‘data types’, for example, integers, lists, strings, expressions,database tables, and files. Different types of properties may beintroduced into the data integration system.

Links interconnect different operator instances. For example, datadescribed by a virtual table, exits from one operator's output port andenters into another operator's input port. There may be multiple linksexiting one output port, however, one input port may accept only oneincoming link. If an operator requires two incoming links, then twoinput ports may be defined. Links may also have properties to explicitlyidentify the semantics of the interconnection between two operatorinstances in logical operator graph 308.

Ports may also have defined properties. Port properties link the port toa specific data type. As a result, port properties are used to provideadditional operational parameters in context to the specific input oroutput.

Each type of operation that needs to be performed by the system isdescribed by an operator definition. An operator definition is aspecification or special meta-data structure managed in the dataintegration system. The operator definition may be represented andintroduced into the data integration system in various ways. Theoperator definition serves as a means to extend the system, sinceoperator definitions may be added to introduce new functionality intothe system. Regions are also identified by region definitions, which arevery similar to operator definition. Different regions may also beintroduced into data integration system 300 whenever new runtime enginesneed to be supported.

The operator definition includes a name that uniquely identifies itsfunctionality and the runtime engines that support this function. Theoperator definition also includes a set of input ports and output ports.If the operator includes input ports or output ports, each port isuniquely named and each port is associated ordered according to stagingpreferences. For example, the input or output ports may bepreferentially ordered temporary table, persistent table, queue, flatfile, and extensible mark-up language (XML) file.

The operator definition also includes a set of properties that may beset by the user to customize the functionality of this operation, and anoperator specific code generator module that conforms to the system'scode generation engine interface. The system's logical operator graphlevel code generator invokes this operator specific code generatorwhenever an instance of this operator type is encountered. An operatordefinition may have a different code generator for each type of regionpresent and generate code dependent on the region to which an operatorinstance is categorized. Similarly, the same code generator module mayinstead programmatically determine the operator's region and suitablygenerate region-specific code. For example, a File Import operator maybe classified into a structured query language region or into aDataStage region, depending on the classifier's optimization criteria.For a File Import in a structured query language region, structuredquery language queries or a Load/Import statement, may be generated bythe code generator. If however, the File Import operator has been placedinto a ‘DataStage’ region, then the code generator may instead generatedata stage parallel job code instead. As a result, when a new operatordefinition is introduced into data integration system 300, the extenderof the system may then decide to also support all or some of thecurrently-existing regions by specifying which regions this operator maybe supported under. Similarly, whenever a new runtime engine is added, anew region ‘type’ is introduced into the system. At this time, theextender of this system may decide to alter certain operator definitionsto be supportable in this region or add new operator definitionsspecific to that region.

Execution plan graph 312 is an ordered sequence of code units that areproduced by code generation system 306. Each code unit represents aparticular unit of work and is associated with a specific runtime engineby the code type used. Additionally, each code unit has associatedattributes and resource references. For example, code units of type‘Java’ are associated with the ‘Java virtual machine’ runtime engine.Each Java code type also has an associated attribute called ‘Class name’to indicate the object to be instantiated and executed as well as otherattributes and values used as runtime arguments to the instantiatedobject. Other code types may include ‘Executable’ to indicate that anexecutable needs to be executed. A code unit of type ‘SQL’ is,associated with a database engine resource, and contains structuredquery language code to be executed against the database engine. A codeunit of type ‘DataStage Job’ indicates that a DataStage job is to beexecuted, and the code unit, contains the DataStage engine resourcereference as an attribute.

Code units are grouped into different transaction blocks. Transactionblocks are used to represent that all code units in that block need tosucceed for a ‘commit’. On a first failure the entire block is ‘rolledback’. All the resources, including data base engines for example, usedin this block are part of the transactional context. In situations,where transactions are not naturally supported, blocks contain ‘catch’or ‘undo’ code units that may be executed to undo the effects of anoriginal code unit to simulate the rollback of a transaction. Forexample, executable code types may be rolled back as needed.

The data integration system execution plan engine, also known as thedata integration system-runtime engine, is used to process executionplan graph 312. This execution engine may process the execution plangraph in a sequence. For example, for each transaction block, theexecution engine identifies the resources in the execution plan graph.The execution engine may connect and begin transactions to database orother runtime environments and initiate a two phase commit, ifsupported. Two-phase-commit is a standard transactional protocol and isa distributed algorithm which lets all nodes in a distributed systemagree to commit a transaction. The protocol results in either all nodescommitting the transaction or all aborting, even in the case of networkfailures or node failures. Following such a protocol offers better errorrecovery. For example, jobs are never left only partly completed withparts of the data not being updated. Either jobs are completely done orthey are rolled back to a consistent state. Since two-phase-commit is astandard technique, many vendors offer support for it.

For each code unit, the runtime engine identifies the code type andresource references. Each code unit is executed according to the codetype. For example, for a structured query language code unit, theruntime engine executes the structured query language code associatedwith the code unit using the database engine resource, databaseconnection, and transactional context made at the beginning of thetransaction block.

On a failure, the execution engine executes the ‘catch’/‘undo’ codeunits of the execution plan graph in order to rollback all transactionsstarted. On a successful execution of all the code units, the executionengine commits the transactions. Transaction commit implies that all thechanges are made permanent. A transaction rollback or equivalentexecution of catch/undo code, implies that all changes currently madewill be undone and the system moves back to a consistent or safe state.

FIG. 4 is an exemplary data flow in a heterogeneous data integrationsystem in accordance with an illustrative embodiment of the presentinvention. Data flow 400 may be a data flow such as data flow 302 ofFIG. 3. Data flow 400 is a specialized logical operator graph used toindicate a specific instance of data transformation sequence andsemantics. Data flow 400 uses virtual tables and a collection of virtualcolumns to describe the structure of data moving through links, from oneoperator to another. Virtual columns are similar in concept tostructured query language relational columns including a data type,precision, and length as appropriate. Virtual tables are similar inconcept with structured query language relational tables; however,because this is a logical model, no structured query language orphysical storage modeling is imposed, unless decided later by the codegeneration engine. The virtual tables indicate a form of inter-operatorsemantics.

Data flow 400 may include various operators representing operations suchas structured query language operations and ETL DataStage operations.Consider that Table extract operator 402, join operator 404,de-duplicate operator 406, bulk load table operator 408, and file targetoperator 410 are all structured query language engine operators. Fileextract operator 412 and filter operator 414 are examples of ETLDataStage operators. There are multiple ways of identifying which regiona particular operation is to be placed in. In one illustrativeembodiment, the specific region is explicitly identified by theoperator's definition. In a second embodiment, the operator definitionspecifies a different operator-specific code generator for each regiontype, in the operator definition. Hence the code generated for thisoperator would be different depending on which region it is placedunder. The classifier may then decide which region is best suited, aspart of the optimization process, for this particular operation.

Each type of operation that needs to be performed by the system isdescribed by an operator definition. The operator definition describesthe operator in detail, includes semantics, inputs, outputs, as well asstaging preferences. In FIG. 4, each operation in data flow 400 includesan input port with an incoming arrow and an output port with an outgoingarrow. For example, join operator 404 includes two input ports and hasonly a single output port whereas the de-duplicate operator 406 has twooutput ports with only a single input port.

In this example, file extract operator 412 may access a text file forsales. File extract operator 412 outputs information to filter operator414. Filter operator 414 may filter the text file to output only ordersthat were made on February 14^(th) of the current year. The filtereddata is output to join operator 404.

Table extract operator 402 may have reference to a ‘sales’ database fromwhich data is to be extracted as output to join operator 404. Dataextracted from the structured query language table may be joined withdata from a file filtered by DataStage in join operator 404 with a ‘joincondition’ by setting the join operator's property say, matching by‘order number’. The output from join operator 404 is input intode-duplicate operator 406. De-duplicate operator 406 is an operator ornode with multiple output ports. For example, distinct data is output byde-duplicate operator 406 and is loaded onto a target table by bulk loadtable operator 408 and duplicate data is saved into a file by filetarget operator 410.

FIG. 5 is a flow diagram illustrating a processing framework for a dataintegration system in accordance with an illustrative embodiment of thepresent invention. Data processing framework 500 of FIG. 5 may beimplemented in a data integration system such as data integration system300 of FIG. 3. Input 502 may be a data flow submitted by a user. Dataflows input may further be pre-processed and pertinent transformationsequence information extracted as a logical operator graph model. Input502 may include source logical operator graph (LOG) 504, resourcereferences 506, and build hints 508.

Source logical operator graph 504, which may also be a data flow, is thedata structure that is built by the user in the form of a flow,indicating a desired transformation sequence. For executing such dataflows, the user also needs to introduce into the system, the variousresources available. For example, there could be structured querylanguage resources, such as the IBM DB2 database engine, the IBMInformix database engine, or an external extract transform engine suchas the Websphere DataStage engine, as well as other resources such as“machines”. Each such resource reference 506, includes informationregarding each runtime engine, which may include version,compatibilities, and necessary libraries. Operators may have referencesto these resources.

For example, a ‘Table Source’ operator may need to indicate that thestructured query language table exists in a particular database and sothe database resource reference associated is associated with theoperator's properties. Build hints 508 are hints used by the codegenerator for generating code based on input 502. For example, in oneexample build hints 508 includes flags used during code generation.

Some of build hints 508 include a ‘debug’ flag or an ‘optimize’ flag.The users, prior to invoking the code generation option, may set theflags to tune the operation of the code generators. For example, ‘debug’may cause certain code generators to generate code that has debugging ortrace statements for easy diagnostics. In one example, source LOG 504may be an in-memory object saved as an extensible markup language (XML)file. Representing the data flow and logical operator graph as anextensible markup language file provides maximum portability andprovides a potentially standard way of import/exporting flows and foreasily enabling different user interface tools or scripting languagesfor building the source data flow. Source logical operator graph allowsusers to update properties and in general model the flow of operationsthat a user needs performed. In-memory objects, such as source LOG 504,are typically saved for later edits. The handling of different operatortypes, semantics and exact storage of source LOG 504 is implementationdependent.

Input 502 is passed to LOG region classifier 510. LOG region classifier510 groups sequences of operator instances into individual regions. Eachregion, or smaller separated data flow, corresponds to a runtime enginecapable of supporting all of the operations in the region in sequence.New region types may be added to the system, by an extender. Each regionhas a ‘region type’ to indicate the applicable type of runtime engine.Each region has a definition similar to the operator definition, inwhich additional properties may be specified as needed, as well asRegion-specific aggregator modules. For example, region types mayinclude a ‘structured query language’ region type as well as ‘DataStage’region type and the region properties may be used by different codegenerators for each region. Whenever one operator instance in a regionis connected by a link to another operator in a different region, thislink is termed as an inter-region link or staging terminal and serves toidentify situations that may need data staging. One advantage ofgrouping operator instances is that runtime engine specificoptimizations are possible. LOG region classifier 510 is alsoresponsible for ordering the runtime engine execution code. LOG regionclassifier 510 creates an individual execution plan corresponding toeach region and lays each execution plan out in sequence. The codegenerators are then able to add on code units to the correspondingregion's execution plan.

LOG region classifier 510 creates classified regions 512. Classifiedregions 512 include the operators as categorized and include stagingterminals. Staging terminals tell how each region is connected andensures that operators remain in the proper order. Classified regions512 are passed to region specific classifier and optimizer 514. Regionspecific classifier and optimizer 514 typically perform, merge, split,and reorganization operations. Region specific classifier and optimizer514 also ensures that data types are compatible with the staging code.In an illustrative embodiment, environment specific optimizations areperformed for each runtime region. Optimization decisions may be made bycustom region specific optimizer modules developed by extenders of thissystem. The creation of modules may be especially useful for newerruntime engines. For example, a structured query language region codegenerator may combine a sequence of database table extract operationsand a filter operation into a single structured query language code unitwith a SELECT and WHERE clause.

Region specific classifier and optimizer 514 outputs classifiedoptimized regions 516. Each classified optimized region 516 isrepresented by a smaller logical operator graph. The smaller logicaloperator graph is the same data structure that is used to represent theoriginal monolithic non-classified flow. Each classified optimizedregion 516 is processed by LOG code generator and optimizer 518 whichtraverses that region's logical operator graph in sequence of operationsand invokes each operator's code generator. The code generated by LOGcode generator and optimizer 518 is placed in order into the executionplan.

For each link inside the regions, the LOG code generator and optimizer518 checks if there needs to be staging between the upstream operationand the down stream one. For example, if the output port indicates thatit may produce files and the input port indicates that it may consumefiles, no staging is required. However, if the down stream operatorexpects a persistent database table, then LOG code generator andoptimizer 518 generates code that loads the file into a suitabledatabase table. The columns in the generated database table conform tothe columns of the input port's virtual table.

LOG code generator and optimizer 518 ensures that for every inter-regionlink, additional code is generated to perform data staging if needed.The additional code ensures that interconnected regions pass data in thecorrect format as expected by the operators in each region. Additionalcode is generated dependent on whether the input and output ports of thelink have compatible staging specifications.

During the processing of each region's logical operator graph by LOGcode generator and optimizer 518, operator specific code generators 520generates code units 522 for operators in each region. Code units 522are specific for each type of plan and tell the execution plan whichruntime engine resource is used to execute each operator. For example,given two structured query language code units, one to be executedagainst resource ‘database A’ and another to be executed againstresource ‘database B’, it may be entirely possible that both these codeunits exist in the same structured query language region. The executionplan is a collection of the code units in a specified order.

LOG plan aggregator 524, builds the final execution plan by merging, insequence, all the transaction blocks and code units 522 from thedifferent region specific execution plans, interspersed by theinter-region staging code, if any. Region specific aggregators 526 areused to aggregate code units 522 or other structures into the finalexecution plan. For example, with a DataStage region, a region specificaggregator within region specific aggregators 526 chains together codeunits 522 to form a DataStage parallel job. A DataStage parallel job isextensible markup language text that represents and describes the workto be done in a DataStage engine. The execution plan contains areference to this generated parallel job's identification.

Apart from the runtime execution code placed in runtime execution plan532, code generators may also generate output 528 including ‘deployment’and ‘un-deployment’ code placed in corresponding execution plans indeployment plan 530 and un-deployment plan 534 respectively. Deploymentplan 530 is used to prepare different runtime engines for productiontime execution. For example, to create once-only tables and storedprocedures in structured query language engines that are needed later onfor regularly scheduled executions. Un-deployment plan 534 is used toundo or clear the effects of executing deployment plan 530. Run plan 532includes the execution plan that may be run multiple times based on theuser's requirements. The run plan is typically called the ‘datatransformation job’ that is usually scheduled for day-to-day operations.

FIG. 6 is the data flow of FIG. 4 divided by region in a heterogeneousdata integration system in accordance with an illustrative embodiment ofthe present invention. Data flow 600 is the data flow 400 and operationsof FIG. 4 divided by region. In this example, data flow 600 is dividedinto two regions based on two different runtime engines.

Structured query language region 602 includes multiple operators for adata base engine such as structured query language runtime engine.DataStage region 604 includes operators for a DataStage engine.Structured query language region 602 and DataStage region 604 areinterconnected by staging terminal 606. Staging terminal 606 ensuresthat data passed from the output port of the filter operator 414 inDataStage region 604 is understood as received by the input port of joinoperator 404 in structured query language region 602.

In one example, filter operator 414 in DataStage Region 604 outputs afile to staging terminal 606. Staging terminal 606 converts the fileinto a temporary table more easily understood by the structured querylanguage engine of structured query language region 602. The temporarytable is output by staging terminal 606 to the input port of joinoperator 404 of structured query language region 602. As a result, thedifferent operators of each region are able to communicate according tostaging preferences. The staging choices may be prioritized preferencesfor inter operator interfaces as established by an operator designer,listed in priority order in an operator's definition. For example, anoperator may prefer to receive input in a table, file, queue, or otherformat specified in the interfacing preferences.

FIG. 7 is a flow diagram illustrating a region processing framework fora data integration system in accordance with an illustrative embodimentof the present invention. The region specific data processing framework700 of FIG. 7 is an example of how specialized region processing occursmay be implemented in a data processing framework such as dataprocessing framework 500 of FIG. 5. FIG. 7 uses the example of a‘DataStage’ region to show how a region's processing is invoked by thegeneric LOG classifier, LOG code generator and LOG plan aggregatorcomponents. LOG classifier 702 invokes DataStage regionclassifer/optimizer 704 using DataStage region 706 including stagingterminals as input. DataStage operator code generators 708 are invokedby LOG code generator 710. DataStage operator code generators 708outputs information to DataStage region aggregator 712. LOG planaggregator 714 inputs execution plans into DataStage region aggregator712. DataStage region aggregator 712 outputs execution plan 716 whichmay include various elements including deployment plan 718, run plan720, and un-deployment plan 722.

Deployment plan 718 includes a reference to code unit 724. Code unit 724is a DataStage parallel job 716 which is in an extensible mark-uplanguage (XML) format and includes unique job identification. Theextensible mark-up language file of code unit 724 indicates that thisparallel job is to be deployed into the target DataStage runtime engine.Run plan 720, has a reference to code unit 726 and the same Datastagejob identifier as code unit 724. Code unit 726 and the associated jobidentifier indicates that during execution, code unit 726 needs toexecute that specific job, in the target DataStage engine. Un-deploymentplan 722 includes code unit 728 and also has a reference to the sameDatastage job identifier of code units 724 and 726 and indicates thatduring un-install, the Datastage job must be un-deployed/deleted fromthat DataStage engine.

For example, the job identification may be 665 to be executed byDataStage engine ‘D1 ’. Code unit 724 would have the reference ‘D1 ’ aswell as a reference to the XML file describing the DataStage job withjob identification 665. Code unit 726 and code unit 728 would have thereference to the DataStage engine ‘D1 ’ as well as the job ‘665’.

FIG. 8 is an exemplary execution plan for the data flow 600 of FIG. 6for a data integration system in accordance with an illustrativeembodiment of the present invention. Execution plan 800 may be executedby any number of runtime engines. In this example, the execution plan isdirected toward data flow 400 of FIG. 4 and data flow 600 of FIG. 6.Various steps in FIG. 6 are directed toward file extract operator 412,filter operator 414, table extract operator 402, join operator 404, deduplicate operator 406, bulk load table operator 408 and file targetoperator 410 of FIG. 4 respectively. Clear delineation of steps inexecution plan 800 may not directly translate to operators becauseduring processing operations may be merged or split into multipleoperations.

Execution plan 800 is sequentially ordered into two integratedtransactions. The DataStage transaction begins (step 802). Next, theDataStage engine executes the specific DataStage job (step 804), in thecontext of the DataStage transaction started in step 802. Step 802 andstep 804 of execution plan 800 correspond to DataStage region 604 ofFIG. 6 which includes file extract operator 412 and filter operator 414from FIG. 6. Next, the DataStage operator physically implementing thestaging terminal converts the file to a table (step 806). Next, theDataStage transaction ends (step 808).

Next, the structured query language (SQL) transaction begins (step 810).The structured query language engine executes a query (step 812). Thequery of step 812 corresponds to structured query language region 602which includes table extract operator 402, join operator 404, deduplicate operator 406 of FIG. 6. The result of the query of step 812corresponds to the bulk load operator 408 of FIG. 6. Next, thestructured query language engine executes another query (step 814). Thequery of step 816 corresponds to file target operator 410 of FIG. 6. Thestructured query language engine executes another query (step 816) whichinvolves finally committing the structured query language transaction ofexecution plan 800. The entire structured query language transaction iscompleted after the completion of step 816.

FIG. 9 is a flow diagram illustrating code generation in accordance withan illustrative embodiment of the present invention. FIG. 9 may beimplemented in a data integration system such as data integration system300 of FIG. 3. Data flow 902 is user input and may be received by a codegeneration system such as code generation system 306 of FIG. 3. The codegeneration system converts data flow 902 into logical operator graph904.

Logical operator graph 904 is converted into extended query graph model906, an internal data model used for analysis. As mentioned before, theanalysis may include optimizations. After analysis, extended query graphmodel 906 is converted into execution plan graph 908.

Various runtime engines may be used to execute execution plan graph 908.Data extract, transform, and load (ETL) engines are one commonly usedform of engine. Various ETL engines are used for different applicationsbased on criteria such as functional use and vendor preferences. Forexample, some ETL engines process ETL operations through structuredquery language and structured query language procedural language(SQL/PL). SQL/PL is a language extension of SQL that consists ofstatements and language elements that can be used to implementprocedural logic in SQL statements. SQL/PL provides statements fordeclaring variables and condition handlers, assigning values tovariables, and for implementing procedural logic. Other ETL engines usetheir proprietary ETL engines to process operations. Logical operatorswithin data flow 902, logical operator graph 904 are independent of theruntime environment each logical operator may be associated with. As aresult, the logical operators may be manipulated, analyzed, andoptimized without need to correlate the changes or manipulations withthe associated runtime environment.

Illustrative embodiments of the present invention may be used togenerate both internal transformation graph models that are extensibleto support new operators, appropriate execution code modules and datainterchange code modules in order to execute a transformation job acrossmultiple runtime engines, and code modules for different runtime enginesfrom the same internal representation. For example, a data flow may becompiled into an execution graph for strict structured query language orinto an execution graph for strict DataStage engine execution by usingthe appropriate code generator.

FIG. 10 is an exemplary data flow diagram for different runtime enginesin accordance with an illustrative embodiment of the present invention.Data flow 1000 includes multiple operations. In the following example,section A 1002 of the data flow 1000 includes operations run on adatabase server such as DB2. Section B 1004 includes operations run on aDataStage server. A code generation system such as code generationsystem 306 of FIG. 3 converts data flow 1000 into logical operator graph1006 which may include SQL/PL statements 1008 and extensible mark-uplanguage (XML) presentation 1010 for section A 1002 and section B 1004respectively. Staging terminal 1012 is used to synchronize and pump thedata between the two disparate sections.

The code generator takes the logical operator graph and converts thelogical operator graph into an extended query graph model (EQGM) foranalysis. The code generator maps logical operator graph operations toextended query graph model operations. In some cases, properties andlinking dependencies are used to map the logical operator graphoperations to extended query graph model operations. Additionally, asingle logical operator graph may be mapped to multiple extended querygraph model operations as necessary to represent the functionality ofthe original data flow. Extended query graph model is an extension toDB2 query graph model (QGM).

Query graph model is an internal representation of queries, capturingthe entire semantics of SQL queries. Query graph model facilitates querysemantic checking, optimization and execution plan generation. Querygraph model is used as a core component in DB2 server's query processingas a proven industrial strength system.

A large set of extract, transform, load (ETL) operations may be mappeddirectly to natural structured query language (SQL) operations. Forexample, an extract, join, load operation may be mapped directly to astructured query language INSERT statement with a JOIN clause. Anextract, filter, update operation may be mapped directly to a structuredquery language MERGE statement with a WHERE clause.

Extended query graph model extends query graph model with anarchitecture that is capable of handling all extract, transform, loadoperations that are either structured query language based or run onproprietary extract, transform, load engines. For example, extendedquery graph model includes new operations that represent other extract,transform, load operations. The new operations may be categorized intothree types: structured query language operations, executableoperations, and custom operations.

Structured query language operations are similar to existing query graphmodel operations, each structured query language operation represents anextract, transform, load operation that will be implemented bystructured query language. The existing query graph model operationsinclude operations such as, SELECT, GroupBy, SetOpr, Delete, Insert, andUpdate. The extended query graph model operations include operationssuch as, FileOpr, MergeOpr, and DiscardOpr. Executable operationsrepresent an extract, transform, load operation that will be implementedby an executable such as Java program, shell script, or command line.

Custom operations represent an extract, transform, load operation thatwill be implemented by a special module or engine, such as animplementation provided by partners, third-parties, or another extract,transform, load engine. Custom operations not only provide a pluggablecustomizable operation, but also enable integration with other extract,transform, load engines.

Extended query graph model is a natural fit to present a diverse rangeof extract, transform, load operations that run on a database engine.Each extended query graph model operation has the operation type andproperties. The code generation system may include a code generator foreach query graph model operation type. The code generator generates codefor each query graph model operation based on operation type andproperties.

The code generation system also includes an extended query graph modelconverter that converts a logical operator graph to an extended querygraph model graph. The extended query graph model converter maps alogical operator graph operator to multiple extended query graph modeloperations, and transforms relationships between extract, transform,load operations into extended query graph model entities andrelationships.

The code generation system includes an execution plan graph generatorthat traverses and optimizes an extended query graph model graph,invokes code generator of each query graph model operation, andgenerates an execution plan graph that contains code units to beexecuted by the extract, transform, load engines.

The content of an extended query graph model contains operations andstaging terminals. An operation represents a data set, and is associatedwith an operation such as SELECT, GROUP BY, UNION, INSERT, and MERGE.The content of an operation includes the description of the output dataset the operation represents, and the description of how the output dataset is computed such as structured query language, executable, or customcode. The description of the output data set of an operation containsinformation such as name, schema such as column descriptions, and columnorder. An operation also includes quantified tuple variables, calledquantifiers, which range over other operations, and represent operandsof the set operation.

FIG. 11 is an exemplary flow diagram showing a logical operator graphmapped to an extended query graph model in accordance with anillustrative embodiment of the present invention. FIG. 11 illustrateslogical operator graph 1100 being mapped to an extended query graphmodel graph 1102. The mapping process may be performed by a codegenerator such as code generation system 306 of FIG. 3.

Logical operator graph 1100 includes various operations including join1104, splitter 1106, aggregate 1108, join 1110, filter 1111, andDataStage peek 1112. Each operator of logical operator graph 1100 may bemapped directly to an extended query graph model operation, transformedto a set of table functions and stored procedures, converted directly toan extended query graph model quantifier, or mapped to properties of anextended query graph model entity. Extended query graph model 1102includes various operations mapped from logical operator graph 1100including select 1114, insert/load 1116, table 1117, select 1118, select1119, group-by 1120, select 1122, and custom 1124.

In the example of FIG. 11, aggregate 1108 operator is mapped directly togroup-by 1120 operation of extended query graph model 1102. Splitter1106 is mapped to insert/load 1116, table 1117, select 1118, and select1119 in extended query graph model 1102. In some cases, a logicaloperator graph operator may be mapped to multiple operations. Forexample, an extract, transform, load operator, such as splitter 1106,does not have native structured query language set function support. Asa result, splitter 1106 is represented by multiple structured querylanguage operations, insert/load 1116, table 1117, select 1118, andselect 1119.

In some cases, a logical operator graph operator may be mapped toextended query graph model quantifiers. For example, join 1104 operatorin logical operator graph 1100 is converted into an extended query graphmodel node and the quantifier that represents a predicate such as select1114 and quantifier 1126.

In some cases, a logical operator graph operator may be converted toextended query graph model properties. For example, a logical operatorgraph filter operator such as filter 1111 is transformed to conditionproperty 1128 of the extended query graph model operator select 1122. Inother cases, an expression in logical operator graph 1100 is convertedto an expression tree in extended query graph model 1102 and linked torelated extended query graph model operations and edges. If theexpression represented in logical operator graph 1100 is already aparser tree, it can be used directly by extended query graph model 1102.For example, an expression such as expression 1130 is converted to anexpression tree 1132 which is linked to extended query graph modeloperation select 1119.

FIG. 12 is an exemplary flow diagram of code generated by a codegeneration system in accordance with an illustrative embodiment of thepresent invention. FIG. 12 is a more detailed illustration of theelements of FIG. 9. Data flow 1202 includes various operations used by acode generation system to generate logical operator graph 1204 based ondata flow 1202. Logical operator graph 1204 is converted to extendedquery graph model 1206, which is in turn translated to extended plangraph 1208. The functionality and performance of each operation ismaintained from data flow 1202 to execution plan graph even if differentcode or operations are used by logical operator graph 1204, extendedquery graph model 1206, and extended plan graph 1208. The code generatedfor FIG. 12 may be performed by a code generator such as code generationsystem 306 of FIG. 3.

For example, the operations of execution plan graph 1206 may be instructured query language procedural language or other runtimeartifacts. For a mixed data flow in which parts of data flow 1202 arerun on different runtime engines, non-SQL operators in logical operatorgraph 1204 may be mapped to custom nodes in extended query graph model1206. The runtime engines for different operators may be specified bythe designer. The runtime engine may also be specified by the codegeneration system based on the characteristics of the data and theavailable target engines.

FIG. 13 is a data flow diagram interconnecting multiple operators for adata integration system in accordance with an illustrative embodiment ofthe present invention. Data flow 1300 represents a logicaltransformation and flow of data. Data flow 1300 may be a data flow suchas data flow 302 of FIG. 3. Transformations are identified by operators.The data flow is designed by the user to implement business logic, butthe transformations represented by the operators in data flow 1300 areexecuted on a platform that is capable of performing thesetransformations. The platform may be any type of runtime engine,including for example, a DataStage engine or a structured query languageengine.

Data flow 1300 includes operator 1 1302, operator 2 1304, operator 31306, operator 4 1308, operator 5 1310, operator 6 1312, operator 71314, operator 8 1316, operator 9 1318, and operator 10 1320. Usersconnect the operators of data flow 1300 by directed links. Directedlinks serve two purposes. First, the directed links indicate the flow ofdata from operator to operator and second, the directed links indicatethe order in which data flows between operators. In the process ofclassifying and sequencing of operators, user intent for both thesepurposes is retained. Directed links are shown in FIG. 13 as arrowsconnecting the operators.

Data flow 1300 is a mixed-mode data flow because data flow 1300 includesoperators of different types. Operators are classified into differenttypes based on the runtime engine they are run on. Operators are alsocharacterized by whether they produce data for the data flow, consumedata, or transform data. The differently characterized operators arereferred to as source operators, target operators and transformoperators respectively.

Data flow 1300 may include any number of operator types. In the exampleof FIG. 13 includes data flow 1300 is characterized by two differenttypes of operators represented by a square and ellipse. The squareshaped operators, such as operator 1 1302 and operator 4 1308, may bestructured query language (SQL) operators. The ellipse shaped operators,such as operator 2 1304 and operator 5 1310, may be DataStage operators.Data flow 1300 is a mixed mode data flow with 10 operators. Operator 11302 and operator 2 1304 do not consume any data, these operator onlyproduce data that is consumed by operator 3 1306.

Operator 3 1306 is also a producer, producing data for operator 4 1308and operator 5 1310. Operator 4 1308 produces data for operatorsoperator 6 1312 and operator 7 1314. Operator 5 1310 also produces datafor operator 6 1312 and operator 7 1314. Operator 6 1312 and operator 71314 produce data that is consumed by operator 8 1316. Operator 9 1318and operator 10 1320 consume data produced by operator 8 1316.

The dependencies of the operations require that operator 1 1302 andoperator 2 1304 are executed before operator 3 1306. Operator 3 1306execute before operator 4 1308 and operator 5 1310. Operator 4 1308 andoperator 5 1310 both finish execution before operator 6 1312 andoperator 7 1314. Operator 8 1316 may start after operator 6 1312 andoperator 7 1314 have finished, and operator 8 1316 finish beforeoperator 9 1318 or operator 10 1320 begins.

An illustrative embodiment of the present invention provides a computerimplemented method, apparatus, and computer usable program code whereinoperators may execute on different runtime engines, but are representedin the same data flow 1300. Without this capability, users would firsthave to plan their business transformation, identify operators thatperform the transformation, classify and segregate operators of the sametype that execute on a particular runtime engine, gather such operatorsin their respective data flows, and then manually order the execution ofthese data flows to ensure there is a logical flow of data between theruntime engines. Each data flow executes in an engine that supportsoperators of a particular type. A region is a data flow that containsoperators of the same type. As a result, operators of the same type in amixed-mode data flow such as data flow 1300 are grouped together intoregions. Data flow 1300 is thus made up of many regions connectedtogether.

FIG. 14 is a table representing operator classification of FIG. 13 inaccordance with an illustrative embodiment of the present invention.Table 1400 is used to classify the operations of data flow 1300 of FIG.13. Each operator is divided into regions 1402, classified according totype 1404, and each region is assigned execution order 1406 according tooperators 1408.

The types supported in the current implementation are DataStageoperators and structured query language (SQL) operators. DataStageoperators are executed against the DataStage engine, and structuredquery language operators are executed against a DB2 database engine. Theclassification of operators 1408 within a data flow is extensibleallowing other operator types corresponding to other runtime engines tobe added as needed.

During classification, operators 1408 belonging to the same type 1404are grouped together relative to their position within the data flow. Asmany operators of the same type 1404 are grouped together as allowed bythe data flow. A data flow starts with one ore more source operators andends with one or more target operators. Beginning with the targetoperators the classification process performs a breadth-first search(BFS), assigning each operator in the data flow type 1404 and region1402. Each region 1402 is also assigned an execution order 1406. Theexecution order indicates the sequencing of execution of regions withinthe data flow.

During the classification process each operator “parent” is analyzed todetermine the operator's “children” or “child” that provide some data tothe parent operator. In the process of breadth-first search, if thechild operator is of a different type 1404 than the parent operator, thechild operator is placed in region 1402 which may be shared with otherchildren operators. Each region 1402 is also assigned a numeric value inexecution order 1406. Execution order 1406 is a function of theexecution order of the parent operator. Regions are linked together. Thelinks represent the flow of data from region to region. The entirebreadth-first search process is recursive.

FIG. 15 is the data flow of FIG. 13 classified by region in accordancewith an illustrative embodiment of the present invention. Data flow 1500is data flow 1300 of FIG. 13 classified by region. The goal is to groupoperators of the same type together into regions, so that each regioncan be sent off to a runtime engine that understands the operators inthe region. Additionally, each region is sequenced so that each regionis executed only after its dependencies have been satisfied.

Operator 1 1302 cannot be grouped with any other operator becauseoperator 1 1302 does not connect to any operator of its type. As aresult, operator 1 1302 is placed in its own region R1 1502, whose typeis square shaped corresponding to a structured query language operator.

Operator 2 1304 and operator 3 1306 are grouped into a single region, R21504, whose type is ellipse shaped corresponding to a DataStageoperators. R2 1504 depends on R1 1502 because of the link betweenoperator 1 1302 and operator 3 1306, so R1 1502 is sequenced before R21504.

Although operator 4 1308 and operator 6 1312 are the same type and areconnected together, these operator are not placed in the same region.Operator 6 1312 needs input from both operator 4 1308 and operator 51310, and operator 7 1314 needs input from operator 4 1308 and operator5 1310. If operator 4 1308 and operator 6 1312 were placed in the sameregion the new region would have a circular dependency. As a result,operator 4 1308 is placed in a separate region, R3 1506. R3 1506 dependson R2 1504 because of the link between operator 3 1306 and operator 41308. The separation of operator 4 1308 into region R3 1506 ensures thatR2 1504 executes before R3 1506.

Operation 5 1310 and operation 7 1314 are grouped into region R4 1508.R4 1508 depends on R3 1506 because of the link between operator 4 1308and operator 7 1314. R4 1508 also depends on R2 1504 because of the linkbetween operator 3 1306 and operator 5 1310. The execution order ensuresthat R4 1508 executes only after R2 1504 and R3 1506 have finished.

Operator 6 1312, operator 8 1316, and operator 10 1320 are grouped intoa single region R5 1510 because each is of the same type. R5 1510depends on R3 1506 because of the link between operator 4 1308 andoperator 6 1312. Similarly, R5 1510 depends on R4 1508 because of thelink between operator 7 1314 and operator 8 1316 so we ensure that R51510 executes only after R3 1506 and R4 1508 have finished executing.Operator 9 1318 is grouped into its own region, R6 1512 because it doesnot connect to any operator of the same type.

Data flow 1500 is now classified by a set of regions. Each regionincludes operators of the same type.

FIG. 16 is a partial data flow diagram from FIG. 15 with insertedstaging terminals in accordance with an illustrative embodiment of thepresent invention. Partial data flow 1600 shows operator 1 1302 of R11502 and operator 3 1306 of R2 1504 of FIG. 15. The regions need to movedata from one region to another because each region executes in adifferent runtime engine. The different engine types need to be able topass data to ensure the data flow is effectively executed.

Staging terminal 1602 and staging terminal 1604 are inserted to linkregion R1 1502 and region R2 1504. Staging terminals are placeholdersfor other operators that will perform the actual work of importing andexporting data from the regions. Staging terminals allow users to designdata flows with a mix of operators that run on different runtime engineswithout sequencing them by external means, transferring data in and outof the runtime engines by external means.

Staging terminals are placeholders for “real” source or target operatorsthat perform the actual work of importing or exporting data. Stagingterminal 1602 and staging terminal 1604 are shown as smaller versions ofoperator 1 1302 and operator 3 1306, respectively. Staging terminal 1602is a target operator that is replaced at code generation time with aregion-specific target operator. Staging terminal 1604 is a sourceoperator that is also replaced at code generation time with aregion-specific source operator. Each region has its own set of sourceand target operators. When operators, operator types, and regions aredefined, users also specify source and target operators for each region.Operators on either side of a link are evaluated, if the operatorsbelong to two or more regions, the existing link is broken and theoperators are connected to staging terminals.

FIG. 17 is the data flow of FIG. 15 with staging terminals separatingregions divided into regions and with staging terminals in accordancewith an illustrative embodiment of the present invention. Data flow 1700includes the regions of data flow 1500 of FIG. 15. Staging terminal 1702and staging terminal 1704 are shown as examples of the other stagingterminals between each region.

FIG. 18 is a flowchart illustrating operation of a data integrationsystem in accordance with an illustrative embodiment of the presentinvention. The process of FIG. 18 may be implemented in a codegeneration system such as code generation system 306 of FIG. 3.

The code generation system receives a data flow from a user (step 1802).The data flow may be received from a user interface tool. Next, the codegeneration system creates a logical operator graph using the data flow(step 1804). The logical operator graph is a metadata representation ofthe data flow. In the case of extract, transform, load operators, thelogical operator graph is the internal representation of ETL operationsand mappings. In addition, the logical operator graph may be used torepresent the optimized pertinent portion of the source data flow builtby users of the system.

Next, the code generation system creates an extended query graph modelusing the logical operator graph (step 1806). During step 1806processing logic and optimization algorithms may be used to moreefficiently represent the logical operator graph in an extended querygraph model. The code generation system creates an execution plan graphbased on the extended query graph model (step 1808) with the processterminating thereafter. The execution plan graph created during step1808 may be sent to the runtime engines for execution as needed.

FIG. 19 is a flowchart illustrating data flow code generation inaccordance with an illustrative embodiment of the present invention. Theprocess of FIG. 19 may be data processing framework such as dataprocessing framework 500 of FIG. 5. The process begins classifying adata flow (step 1902). Step 1902 may be performed by a classifier suchas LOG region classifier 510 of FIG. 5. Step 1902 may further involvesplitting the operators in the input data flow into multiple regionsbased on which runtime engine supports the operation, identifyinginter-region connection point and placing staging terminals at thoseconnection points, and arranging the regions in order of intendedexecution.

Next, the process determines if region has been optimized (step 1904).If each region has been optimized, the process terminates. If eachregion has not been optimized in step 1904, each region is optimized(step 1906). The optimization of step 1906 may be performed by a regionspecific classifier and optimizer such as region specific classifier andoptimizer 514 of FIG. 5. In an illustrative embodiment, each region maybe optimized sequentially. In another illustrative embodiment, multipleregions may be optimized in parallel. Step 1904 provides postclassification processing and optimization such as classified optimizedregions 516 of FIG. 5. For example, step 1904 may amend or compensatefor generic classification decisions.

For example, sometimes when newer regions are added, there may be somenon-optimal decisions made when the generic LOG classifications aredone. In such a case, region specific classifier optimizers may be ableto programmatically provide better performance post-classificationprocessing, on a case by case basis. One example, is when an operatorclassified into a region may support, say a File staging input, but onlyunder very restricted conditions (and hence is not advertised assupporting File staging in its operator definition), and if the genericclassifier provided a staging terminal that converted a file into atable, as an un-optimized choice. In such a case, a region specificclassification-optimizer may then programmatically decide, based on thatvery specific situation, that a file is indeed directly acceptable forthat operator instance in that region. Having made such a decision, theregion specific classifier optimizer would then update the stagingterminal itself to provide a file as output. Such a staging terminalwould now have a file as input and file as output, which basically wouldresult, during code generation, in no staging code being needed, therebyremoving an unnecessary transformation step.

Next, the process invokes the data flow code generator (step 1906). Theprocess determines if code has been generated for each region (step1908). If code has not been generated for each region, code is generatedfor each region (step 1910). During step 1910 deployment, execution, andun-deployment plans are generated for each region. Next, the processgenerates staging code (step 1912). Staging code is generated for everyinter-region link or staging terminal such as staging terminal 606 ofFIG. 6. The data flow code generator used in step 1906 and step 1912 maybe a code generator such as LOG code generator and optimizer 518 of FIG.5.

Next, the process aggregates all region plans (step 1914). In step 1914deployment, execution, and un-deployment plans are aggregated from eachregion for the complete data flow. Step 1914 may be performed by a LOGplan aggregator such as LOG plan aggregator 524 of FIG. 5. If code hasbeen generated for each region in step 1908, the process generatesstaging code (step 1912) and aggregates all region plans (step 1914).

Next, the process traverses each region (step 1916). The processdetermines if each operator in the region has been processed (step1918). If the operator has not been processed, the process resolvesstaging with neighboring operators (step 1920). For example, if neededduring step 1920, the process generates code for intermediate tables,files, or queues. Next, the process invokes operator's code generator(step 1922). An operator code generator such as operator specific codegenerator 520 of FIG. 5 may be used in steps 1920-1924. During step 1922code units are produced and tagged as deployment, run, or un-deployment.Next, the process places code units into plans (step 1924). During step1924, code units such as code units 522 of FIG. 5 are placed indeployment, un-deployment and runtime plans for the region.

If each operator in the region has been processed in step 1918, theprocess places code units into plans (step 1924).

Next, the process performs post aggregation processing (step 1926). Step1926 is used to process the deployment, run, and un-deployment plans forthe complete data flow. The process determines whether each region hasbeen aggregated (step 1928). If each region has been aggregated, theprocess terminates. If a region has not been aggregated in step 1928,the process aggregates the region (step 1930). Step 1930 may beperformed by a region specific aggregator such as region specificaggregators 526 of FIG. 5. Region specific aggregation may be performedbased on the runtime engine of the region and respective operators inthe region by a region specific aggregator. Additionally, regionspecific aggregators may be added as needed for newer runtime engines.In addition, during step 1930, the region specific aggregator may amend,compensate, optimize, or clean up previously performed genericaggregations. The final output may be an output such as output 528 ofFIG. 5.

FIG. 20 is a flowchart illustrating the process of converting a logicaloperator graph to an extended query graph model in accordance with anillustrative embodiment the present invention. The process of FIG. 20 isa more detailed description of the process of step 1806 of FIG. 18. Theprocess may convert a logical operator graph to a extended query graphmodel such as logical operator graph 1100 and extended query model graph1102 of FIG. 11.

The process begins as the code generation system traverses theoperations in a logical operator graph beginning with the root operation(step 2002). The process determines whether the operator has beenconverted to an extended query graph model operation (step 2004). If theoperation has been converted the process ends. If the operation has notbeen converted in step 2004, the code generation unit determines theoperator type (step 2006). Next, the code generation unit converts thelogical operator graph operation to an extended query graph modeloperation (step 2008). The code generation optimizes the extended querygraph model (step 2010) with the process terminating thereafter.

FIG. 21 is a flowchart illustrating operator classification, grouping,and ordering in accordance with an illustrative embodiment of thepresent invention. The process may be implemented in a logical operatorgraph processing system or component such as LOG classifier 702 of FIG.7. The data flow processed may be a data flow such as data flow 1300 ofFIG. 13.

The process begins by classifying operators in the data flow (step2102). The operators are classified according to the execution order andorder type in a table such as table 1400 of FIG. 14. Next, the processsegregates the operators into regions (step 2104). Operators with thesame sequence and are grouped together in regions. Because each regioncontains operators with the same sequence, the sequence of the regionmay be considered to be the sequence of the operators in each region.The process then sequences the execution of regions (step 2106) with theprocess terminating thereafter. In step 2106, the regions are sorted indescending order of their sequence to create an execution order of theregions. At the end of step 2104 the process of classification ofoperators into regions and the sequencing of regions is complete. Theordering of regions in step 2106 determines the execution order. Theregions are then designated for a runtime engine corresponding to thetype of the region.

FIG. 22 is a flowchart illustrating classification of operators in thedata flow in accordance with an illustrative embodiment of the presentinvention. The process of FIG. 22 is a more detailed description of step2102 of FIG. 21. The process begins by creating a first-in first-outqueue (step 2202). The process maintains a table of operator type andcurrent sequence (step 2204). The operator type and sequence of theoperator are classified according to a table such as table 1400 of FIG.14. The table is used to keep track of the sequence number for each typeof operator. Initially, each type will have a sequence numberinitialized to the ordinal number of the type. For example, if there arethree types of operators each type would be assigned as 1, 2, or 3.

Next, the process gets the list of operators in the data flow (step2206). The process determines if the operator has any outgoing links(step 2208). If the operator does not have any outgoing links, theprocess looks up the operator type and assigns the operator a sequence(step 2210). The process adds the operator to the queue (step 2212).Next, the process determines if there are operators in the queue (step2214). If there are operators in the queue, the process assigns theoperator a sequence (step 2216) with the process terminating thereafter.If there are not operators in the queue, the process ends. If theprocess determines the operator does have outgoing links in step 2208,the process adds the operator to the queue (step 2212).

FIG. 23 is a flowchart illustrating operator sequencing in accordancewith an illustrative embodiment of the present invention. The process ofFIG. 23 is a more detailed description of step 2216 of FIG. 22 performedwhile there are operators in the queue. The process begins by settingthe next operator in the queue as the parent (step 2302). Next, theprocess determines if the parent has a child (step 2304). If the parentdoes not have a child the process ends. If the parent does have a childin step 2304, the process determines if the parent is the same type asthe child (step 2306). The parent operation is the same as the childoperation if they are designated to be executed by the same type ofruntime engine.

If the parent is the same type as the child, the process determines ifthe child's sequences less than the parent's sequence (step 2308). Ifthe child's sequence is less than the parent sequence, the process setsthe child's sequence equal to the parent's sequence (step 2310). Next,the process adds the child to the queue (step 2312) with the processterminating thereafter. If the child's sequence is not less than theparent's sequence in step 2308, the process adds the child to the queue(step 2312).

If the parent is not the same type as the child in step 2306, theprocess sets the child's sequence equal to the current order for thechild's type (step 2314). The current order is specified by a sequencenumber in the table. Next, the process determines if the child'ssequence is less than the parent's sequence (2316). If the child'ssequence is not less than the parent's sequence, the process adds thechild to the queue (step 2312). If the child's sequence is less than theparent's sequence in step 2316, the process gets the next sequence forthe child (step 2318) before returning in a loop to the determination ofstep 2316. The child's sequence is always set to be greater than orequal to the parent's sequence.

FIG. 24 is a flowchart illustrating receiving the next sequence for anoperator in accordance with an illustrative embodiment of the presentinvention. The process of FIG. 24 is a more detailed description of step2318 of FIG. 23. The process begins by setting the sequence equal to thecurrent sequence for the child's type (step 2402). Next, the processsets the sequence equal to the sequence plus the number of operatortypes (step 2404). Step 2404 ensures that for a given operator, thesequence number modulo or number of types of operators, is always thesame as for other operators of the same type. The process then storesthe sequence in the table (step 2406). The process returns the sequence(step 2408) with the process terminating thereafter.

FIG. 25 is a flowchart illustrating separating operators into regions inaccordance with an illustrative embodiment of the present invention. Theprocess of FIG. 25 is a more detailed description of step 2104 of FIG.21 and is implemented for all operators and links in the data flow. Theprocess begins by setting the sequence equal to the sequence of theoperator and the region equal to the region associated with the sequence(step 2502). Next, the process determines if the sequence of theoperator has a region (step 2504). If the sequence of the operator doesnot have a region, the process creates a region and assigns the regionto the sequence of the operator (step 2506). The process then sets theregion's type to the type of the operator the region contains (step2508). Next, the process adds the operator to the region (step 2510). Ifthe process determines the sequence of the operator has a region in step2504, the process adds the operator to the region (step 2510). Steps2502-2510 are performed for the operators of the data flow.

Next, the process sets the source operator for the link equal to thelink's source operator, sets the target operator for the link equal tothe link's target operator, sets the source region equal to the regionof the source operator, and sets the target region equal to the targetoperator's region (step 2512). Next, the process determines if thesource region is the same as the target region (step 2514). If thesource region is not the same as the target region, the process breaksthe link between the source operator and the target operator (step2516). The process adds a staging terminal of type target to the sourceregion and links the source operator to the target staging terminal(step 2518). The process adds a staging terminal of type source to thetarget region and links the source staging terminal to the targetoperator (step 2520) with the process terminating thereafter. The targetstaging terminal corresponds to the source target and the source stagingterminal corresponds to the target region. If the source region is thesame as the target region in step 2514, the process ends.

Aspects of the present invention provide a computer implemented method,apparatus and computer usable program code for integrating data flow indata environments. The data integration architectures model receives auser data flow, which is then processed by one or more runtime engines.The data flow is automatically modeled to run on different runtimeengines in proper sequence with automatic data exchange betweendifferent runtime engines without user interaction.

The data integration system generates different models or formatrepresentations of the data flow that may be used to better organize andsequence operations in the data flow into runtime specific regions.

The data integration system allows for customized code generation forexchanges between two known engines without writing customizing theinteraction between the engines. For example, since a DataStage extract,transform, load (ETL) engine is capable of accessing DB2 databasetables, the data integration system would instead generate code toexchange data inside structured query language (SQL) views or structuredquery language tables rather than files.

The invention can take the form of an entirely hardware embodiment, anentirely software embodiment or an embodiment containing both hardwareand software elements. In a preferred embodiment, the invention isimplemented in software, which includes but is not limited to firmware,resident software, microcode, etc.

Furthermore, the invention can take the form of a computer programproduct accessible from a computer-usable or computer-readable mediumproviding program code for use by or in connection with a computer orany instruction execution system. For the purposes of this description,a computer-usable or computer readable medium can be any tangibleapparatus that can contain, store, communicate, propagate, or transportthe program for use by or in connection with the instruction executionsystem, apparatus, or device.

The medium can be an electronic, magnetic, optical, electromagnetic,infrared, or semiconductor system (or apparatus or device) or apropagation medium. Examples of a computer-readable medium include asemiconductor or solid state memory, magnetic tape, a removable computerdiskette, a random access memory (RAM), a read-only memory (ROM), arigid magnetic disk and an optical disk. Current examples of opticaldisks include compact disk—read only memory (CD-ROM), compactdisk—read/write (CD-R/W) and DVD.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code must beretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers.

Network adapters may also be coupled to the system to enable the dataprocessing system to become coupled to other data processing systems orremote printers or storage devices through intervening private or publicnetworks. Modems, cable modem and Ethernet cards are just a few of thecurrently available types of network adapters.

The description of the present invention has been presented for purposesof illustration and description, and is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the art. Theembodiment was chosen and described in order to best explain theprinciples of the invention, the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

1. A computer implemented method for generating an execution plan graphfrom a data flow, the computer implemented method comprising: responsiveto receiving the data flow, generating a metadata representation of thedata flow; generating a set of code units from the metadatarepresentation, wherein each code unit in the set of code units isexecutable on a plurality of different types of runtime engines; andprocessing the set of code units to produce the execution plan graph. 2.The computer implemented method of claim 1, wherein the metadatarepresentation is a logical operator graph.
 3. The computer implementedmethod of claim 2, wherein the logical operator graph is comprised ofoperators and wherein the operators are classified into regions inassociation with different runtime engines that support the operators.4. The computer implemented method of claim 3, wherein the regions areseparated by staging terminals for allowing the regions to transferdata.
 5. The computer implemented method of claim 4, further comprising:optimizing the regions.
 6. The computer implemented method of claim 5,further comprising: generating the set of code units for each region;generating staging code for the staging terminals separating theregions.
 7. The computer implemented method of claim 6, wherein theprocessing step further comprises: aggregating the set of code units tobuild a particular execution plan graph for each region.
 8. The computerimplemented method of claim 7, further comprising: processing eachoperator in each of the regions wherein processing comprises: resolvingstaging with neighboring operators; generating a number of code unitsfor each operator to form the set of code unit; and placing the set ofcode units into the particular execution plan graph for each region. 9.The computer implemented method of claim 8, further comprising:performing post aggregation processing.
 10. The computer implementedmethod of claim 9, further comprising: aggregating the particularexecution plan graph for each region into the execution plan graph. 11.The computer implemented method of claim 1, wherein the processing stepfurther comprises: generating deployment code for preparing one or moreruntime engines for execution of the execution plan graph; generatingrun code for executing the execution plan graph; and generatingun-deployment code for undoing the effects of the deployment code. 12.The computer implemented method of claim 1, further comprising:executing the execution plan graph, wherein each of the regions isexecuted by one of the plurality of different types of runtime enginesassociated with the regions.
 13. The computer implemented method ofclaim 12, further comprising: adding at least one new runtime engine forexecuting the execution plan graph.
 14. The computer implemented methodof claim 13, further comprising: establishing a region definition foreach region; and establishing an operator definition for each operator.15. A data integration system comprising: a processor for processing acode generation system; and a storage operably connected to theprocessor for storing the code generation system wherein the codegeneration system may be loaded into a main memory for execution by theprocessor, wherein the code generation system further comprises: alogical operator graph region classifier for classifying operators in amixed data flow, segregating the operators into regions, and sequencingthe execution of the regions to form classified regions; a regionspecific classifier and optimizer for generating classified optimizedregions; a logical operator graph code generator and optimizer forgenerating code units from the classified optimized regions; a operatorspecific code generator for generating a set of code units; a logicaloperator graph plan aggregator for aggregating a plurality of plans; anda region specific aggregator for aggregating a plurality of regionalplans to form an execution plan graph.
 16. The data integration systemof claim 15, wherein the logical operator graph code generator andoptimizer further comprises: a plurality of regional code generatorswherein each of the plurality of regional code generators is associatedwith one of a plurality of different runtime engines.
 17. The dataintegration system of claim 16, wherein each of the plurality ofregional code generators generates code for an associated region andgenerates staging code for staging terminals separating each region. 18.The data integration system of claim 15, wherein the operator specificcode generator resolves staging with neighboring operators and placesthe set of code units into execution plan graphs.
 19. A computer programproduct comprising a computer usable medium including computer usableprogram code for generating code from a data flow, said computer programproduct including: computer usable program code responsive to receivingthe data flow, for generating a metadata representation of the dataflow; computer usable program code for generating a set of code unitsfrom the metadata representation, wherein each code unit in the set ofcode units is executable on a plurality of different types of runtimeengines; and computer usable program code for processing the set of codeunits to produce an execution plan graph.
 20. The computer programproduct of claim 19, wherein the computer usable program code forprocessing the set of code units further comprises: generatingdeployment code for preparing one or more runtime engines for executionof the execution plan; generating run code for executing the executionplan graph; and generating un-deployment code for undoing the effects ofthe deployment code.
 21. The computer program product of claim 19,wherein the metadata representation is a logical operator graph, whereinthe logical operator graph is comprised of operators and wherein theoperators are classified into regions in association with differentruntime engines that support the operators.
 22. The computer programproduct of claim 19, wherein the regions are separated by stagingterminals for allowing the regions to transfer data.
 23. The computerprogram product of claim 19, further comprising: computer usable programcode for optimizing the regions.
 24. The computer program product ofclaim 22, further comprising: computer usable program code forgenerating the set of code units for each region; computer usableprogram code for generating staging code for the staging terminalsseparating the regions.
 25. The computer program product of claim 19,wherein the computer usable program code for processing the set of codeunits further comprises: computer usable program code for aggregatingthe set of code units to build a particular execution plan graph foreach region.
 26. The computer program product of claim 25, furthercomprising: computer usable program code for processing each operator ineach of the regions wherein processing comprises: computer usableprogram code for resolving staging with neighboring operators; computerusable program code for generating a number of code units for eachoperator to form the set of code unit; and computer usable program codefor placing the set of code units into the particular execution plangraph for each region.
 27. The computer program product of claim 26,further comprising computer usable program code for performing postaggregation processing.
 28. The computer program product of claim 19,further comprising computer usable program code for aggregating theparticular execution plan graph for each region into the execution plangraph.
 29. The computer program product of claim 19, further comprising:computer usable program code for executing the execution plan graph,wherein each of the regions is executed by one of the plurality ofdifferent types of runtime engines associated with the regions; andcomputer usable program code for adding at least one new runtime enginefor executing the execution plan graph.
 30. The computer program productof claim 29, further comprising: computer usable program code forestablishing a region definition for each region; and computer usableprogram code for establishing an operator definition for each operator.